'use strict'
var role = {
    name:'zed',
    birth:1987,
    age:function(){
        var y =new Date().getFullYear();
        return  y - this.birth
    }
}
console.log(role.age());

'use strict'
var getage =function(){
    var y = new Date().getFullYear();
    return y-this.birth
}
var role={
    name:'zed',
    birth:1987,
    age:getage
}
console.log(role.age());